#! /bin/python3
# 从标准输入中读入json，将字段命名风格转换成小驼峰后输出
# 例如 {"user_name": "foo"} -> {"userName": "foo"}

import json, sys

def snake_to_camel(s):
    tokens = s.split('_')
    if len(tokens) == 1:
        return tokens[0]
    return "%s%s" % (tokens[0], ''.join([x.title() for x in tokens[1:]]))

def for_array(lst):
    ret = []
    for value in lst:
        if type(value) == dict:
            ret.append(for_obj(value))
        elif type(value) == list:
            ret.append(for_array(value))
        else:
            ret.append(value)
    return ret

def for_obj(data):
    ret = {}
    for key, value in data.items():
        key = snake_to_camel(key)
        if type(value) == dict:
            value = for_obj(value)
        if type(value) == list:
            value = for_array(value)
        ret[key] = value
    return ret

lines = sys.stdin.readlines()
data = json.loads(''.join(lines))
if type(data) == dict:
    data = for_obj(data)
elif type(data) == list:
    data = for_array(data)
print(json.dumps(data, ensure_ascii=False))
